High resistivity semiconductors used in various optoelectronic devices, such as radiation detectors and photoconductive switches, usually require electrical compensation involving deep level defects, which are also closely related to the photocarrier transport dynamics. In this paper, one-dimensional spatiotemporal evolution of photocarriers is numerically investigated in semiconductors containing traps. After introducing a high concentration of traps, the dynamics can be divided into three categories: relaxation, lifetime and intermediate regimes. Photocarriers will separate in the relaxation regime and transport ambipolarly in the lifetime regime. Captured space charges enhance the internal electric field between photogenerated electrons and holes, thus reduce carriers' transport velocities in all three regimes. Storage of photocarriers in traps also weakens the majority carrier depletion in the relaxation regime, and could pin the majority carriers to the injection spot in the lifetime regime. In the intermediate regime, both semiconductor type and relative magnitudes of the dielectric relaxation time and carrier lifetimes determine the photocarrier transport behavior. By combining the threeenergy-level compensation model and the trap-mediated recombination model, the criterion for different regimes and photocarrier transport dynamics are investigated in deep donor compensated CdTe semiconductors.