I learned the hard way. After several short trips to Istanbul eating in tourist traps, I was ready to give up on Turkish food. I quickly found myself looking to fancy restaurants for relief and, if possible, salvation. None was to be found.
It was explained to me by a local Istanbuller (Istanbulian?) that fancy restaurants here are more miss than hit. What I learned from him I will paraphrase for you. These few tidbits of advice completely changed what I thought about the food in Istanbul.
Try as best as you can to avoid any restaurants with English signs. Skip the kebab on Istiklal, follow a side street and keep an eye out for a crowded local eatery - you'll be surprised at how fresh, delicious and diverse Turkish cuisine can be. Dozens of tiny little restaurants, each known for a single dish, cater to thousands of Turks a day and most importantly, take full advantage of the incredible fresh ingredients available nearly year round. At particular times during the day, different dishes are prepared fresh. You've got to get there when it's hot, trust me. I leave the specifics of where and when up to you. Do some searching. After all I can't just let you learn the easy way now can I? Oh, and one last thing: drink more tea.