Means for guiding the beam from the source to the record carrier or from the record carrier to the detector