Lasing in planar semiconductor diodes