On the regularity of solutions of optimal transportation problems