In-situ Self-optimization of Quantum Dot Emission for Lasers by Machine-Learning Assisted Epitaxy