The object of the invention is to reduce the deterioration of crystallinity in the vicinity of an active layer when C, which is a p-type dopant, is doped and to suppress the diffusion of Zn, which is a p-type dopant, into an undoped active layer, thus to realize a sharp doping profile. When a Zn-doped InGaAlAs layer having favorable crystallinity is provided between a C-doped InGaAlAs upper-side guiding layer and an undoped active layer, the influence of the C-doped InGaAlAs layer whose crystallinity is lowered can be reduced in the vicinity of the active layer. Further, the Zn diffusion from a Zn-doped InP cladding layer can be suppressed by the C-doped InGaAlAs layer.