In this paper, we suggest a novel model, based on input pump power and wave guidestructure, to calculate the Er-density profile in Erbium doped fiber amplifiers. This optimization is carried out for both SMF and DSF fibers. These optimized profiles have a Gaussian-like shape. Using the SMF optimized Er-density profile, high gain enhancement is obtained in a relatively short length of fibers. On the other hand, the DSF optimized profile shows small changes in the gain, which agrees with the previously report on other method of gain enhancement. This model is applicable to all active waveguides and any other dopant as well .