Integrability of type II superstrings on Ramond-Ramond backgrounds in various dimensions