I'm not saying this can't be done, because if you try hard enough the software can get around a LOT of hardware limitations. However, as a controls type engineer doing this stuff for 30+ years I can see a lot of gotchyas that you'll need to work around.
1) How accurate do you want this thing to be? You need to realize that most 3D printers are claiming that they can position to within limits that were considered state of the art for integrated circuit dimensions 40 years ago.
2) Your light source, you'll probably want to use a laser. A normal light will spread out in more or less a cone shape once it leaves the source.
3) Are you planning on stopping the bed at what is thought to be the correct position, or at least traveling at the same speed? The hardware will react at a fixed rate and if the bed is traveling at different speeds the "Correct" spot could occur at what seem to be different locations. Been there, done that - got the Tee shirt.
You can try compensating for this, but I wouldn't recommend it. I knew a guy once that was trying to keep a large weight suspended 40' below a traveling car from oscillating when the car slowed down and came to a stop. He worked on that for months and never did get it to work correctly. The calculations can be done, but NOT by an 8 bit Arduino in any reasonable time.
4) It's gonna be a BEAR to align this, and keep it aligned. Think about how much of a shaking the Y axis gets when doing a solid infill on a narrow part.
Again, I'm not saying this can't be done, because my gut feeling is that it can be done. I'm just playing the Devil's Advocate and giving you some things to think about, so you can avoid some dead-ends.
Don