At the Blue Mosque in Istanbul, shoes must be removed. I was wearing nylon ped-type socks, and that was fine. Also, they make some women cover their hair (with a provided scarf if you don't have one, yuck). Thankfully, I had my own. I don't know how they decide who does and doesn't cover their hair. They didn't make the brunettes around me. I'm a redhead. The Hagia Sofia is a museum, so the shoe and scarf rules don't apply there.
In Izmir, the only religious site I visited was the House of the Virgin Mary. There were no dress code rules. I will say that it was very hot at Ephesus though.
This was my second visit to a Muslim country (Malaysia was the other). Regardless of rules, I tried to dress with respect for the culture. I never wore anything sleeveless and wore skirts/dresses that were midcalf-length. I think I received better treatment from locals by doing this.
I hope this was helpful.
Oh, and I echo the above comments with regard to the Vatican. And I did see people turned away at St. Peter's for improper dress.