A search for gravitational lensing in 38 X-ray selected clusters of galaxies