Optical spectroscopy of candidates for quasars at 3 < z < 5.5 from the XMM-newton X-ray survey. A distant X-ray quasar at z = 5.08