Adaptive beam control and analysis in fluorescence microscopy