String perturbation theory in Ramond-Ramond backgrounds