Application of repumping laser in optical switching