Mikrotik equipment is quite picky about SFP/SFP+ modules ... odds are high that modules you tried are fairly different and draw of luck gave working pair of modules.
In principle it should not be a problem to use "long distance" SFPs on shorter fibre routes. The distance mark on SFPs indicates the power budget the SFP offers ... Tx power versus Rx sensitivity.
Tx power usually comes in a range, e.g. from 0 dBm to -5 dBm, Rx sensitivity comes in range as well, e.g. from -3 dBm to -15 dBm. The example ranges make a very short range SFP as it can be used with zero-length fibre (transmit at -5 dBm, all power received and receiver can handle that). Other SFPs can have e.g. Tx between +10 and 0 dBm and Rx between -5 and -25 dBm and that makes them unsuitable for zero-length operations (minimum Tx power of 0 dBm is higher than max Rx power of -5dBm). The other extreme is max power loss, in first example max allowed power loss is 15dB (Tx power 0 dBm, Rx power -20 dBm) and for the second example it's 35 dB. Taking into account typical power loss (around 0.5 dB per km) these max losses translate into 30km (first example) and 70km (second example). For the second example minimum fibre length would be around 10km (but 5dB of "surplus" power can be dropped using fibre attenuator if needed).
Mind that the distance is only estimate ... it only takes into account typical power loss in fibres. Every connector has its own loss (typically around 0.5 dB, depending on connector type and quality), fibre can have higher loss (if it's old), repaired fibres (after breaks) can have higher loss if repaired poorly ... so it's good idea to have some power budget reserve.