Quantum dot lasers with controllable spectral and modal characteristics