In this paper, a theoretical model for quantum dot semiconductor optical amplifier (QDSOA) is proposed. In this model the dynamics of carriers in ground, excited and continuum states and wetting layer are considered. The effects of the second excited state (ES2) inclusion are investigated for the first time in the proposed QDSOA model. Moreover, inhomogeneous broadening effect due to size distribution of dots and homogeneous broadening effect of single dot in gain spectrum by grouping of dots based on their optical resonant frequency are included in the model. Furthermore, grouping of photon modes is considered in the model. It is shown that improvement of QDSOA performance is possible by considering ES2 in rate equations. Gain saturation in different injection currents is obtained for various square-shape pulse train bit-rates. It is shown that carriers' relaxation time plays an important role in signal amplification and processing of QDSOA. The results illustrate that QDSOA can be used for high bit-rate signal processing devices (up to 450 Gbps) with negligible wave distortion and fast gain recovery.