Charge transfer effects and photoemission in transition metal oxides