Abstract: A first cladding layer of a first conductivity type formed above a crystal substrate, an active layer formed above the first cladding layer, a diffusion prevention layer formed on the active layer and preventing an impurity from diffusing into the active layer, an overflow prevention layer of a second conductivity type, the second conductivity type being different from the first conductivity type, which is formed on the diffusion prevention layer and prevents an overflow of carriers implanted into the active layer, and a second cladding layer of the second conductivity type formed above the overflow prevention layer are provided.