Effect of Impurity Diffusion on the Characteristics of Avalanche Photodiode