Origin of oxygen species in Titan's atmosphere