Theory of the laser diode interaction in scanning force microscopy