Ways to build a speedometer for a bike or skateboard
Yes, there are optical sensors that can measure speed.  I worked at the proving grounds for a major car maker.  In the past, anyone testing cars on the oval used "fifth wheels" but these were falling out of favor as of ten to fifteen years ago. Now optical sensors that measure the how the correlation of random surface texture with itself changes over time.

A similar technique is being researched to measure blood speed in blood vessels with tiny probes inserted by catheter.  Same math, very different application.  

There is a possibility of taking the sensor out of a wireless optical mouse, but it's unlikely to work if the distance between sensor and moving surface is more than a few cm.  "Few" might mean only one!  But then, you could use a lens and change that.

But anyway, what sensor can you run out and buy today?  If I had more time I'd look for specific examples, but try googling for "optical flow speed sensor" and see what comes up.