ac-Stark shift and photoionization of Rydberg atoms in an optical dipole trap