Good question! Let's ask the cast of Revenge and Young Avengers, shall we?
Grammar Girl says:
Do you have a curious nature? Do you wonder about things? When you wonder, your statements might sound like questions, but they're not direct questions, they're indirect questions, and they don't take a question mark. For example, I wonder why he went to the store. It's an indirect question—essentially a statement—so there's no question mark. I wonder if Squiggly would loan me his marimbas. Again, it's not a question.
So the quick answer is to not use a question mark:
Why had Tyler done any of the things he'd done, Nolan wondered. Mental illness seemed a pale explanation at best. Any emotion he'd shown that wasn't anger had been faked. He hadn't even enjoyed the sex.
You can also rephrase your sentence and make it flow differently. Then you won't have to worry about using the question mark at all:
Nolan still wondered why Tyler had done any of the things he'd done.
Or if you really want to use a question mark, you can go all the way and make your sentence a straightforward question:
"I wonder sometimes," Nolan muttered as he typed away. "Why did Tyler do any of the things he did? I mean, sure, he was crazy, but ... not even the sex was real. I don't get it."
There are times you can use 'wonder' and keep your question mark:
"I wonder, wonder who -- Who wrote the book of love?" Billy sang to himself, pulling a drawer open and rummaging for a pair of clean boxers.
Teddy rolled over and blinked sleepily at him. "I don't know, and I don't know why you're singing about it so early."
In this case, "I wonder who" is essentially a sentence fragment. "Who wrote the book of love?" is a separate question, and so it's punctuated just like any free-standing question.
You can also use 'wonder' in a question if you're asking a direct question:
"Could the team sociopath have done all this, I wonder?"
Tommy glared at Billy. "Would you stop calling me that?"
So, if you're just wondering, there's no question mark. If what you're wondering is part of a direct question, there is a question mark.
I wonder: Do you have any other questions?