Relativistic calculation of the two photon coupling of scalar and tensor mesons