Yes, all you need is an opto-coupler, or more accurately an opto switch.
You need access to something rotating on the motor, it could just be a point on the motor shaft but it gets easier if you can use something with a larger diameter. All you have to do is use a reflective opto switch and place it close to the moving part. Make a section of the moving part reflective and part of it non-reflective. The light from the opto switch shines on the part and whether or not it sees a reflection depends on the rotational angle (reflective or non-reflective section is in front of the switch). all you have to do then is count the frequency of the reflections, you get one per revolution so it is easy to measure.
If you can access a disk rotating on the shaft you can do the same thing by passing or blocking light through it and using a slotted opto switch instead.
I would be cautious about using a ball mouse opto system, with typically 100 holes in the wheel and at 15,000 RPM the pulses would be very fast, possibly 25KHz or more so counting might be more difficult.
Brian.