The entrainment phenomenon, by which an oscillator adjusts its natural rhythm to an external periodic signal, has been observed in many natural systems. Recently, attention has focused on which are the optimal conditions for achieving entrainment. Here we use a semiconductor laser with optical feedback, operating in the low-frequency fluctuations (LFFs) regime, as a testbed for a controlled entrainment experiment. In the LFF regime the laser intensity displays abrupt spikes, which can be entrained to a weak periodic signal that directly modulates the laser pump current. We compare the performance of three modulation waveforms for producing 1:1 locking (one spike is emitted in each modulation cycle), as well as higher order locking regimes. We characterize the parameter regions where high-quality locking occurs, and those where the laser emits spikes which are not entrained to the external signal. The role of the modulation amplitude and frequency, and the role of the dc value of the laser pump current (that controls the natural spike frequency) in the entrainment quality are discussed.