We present a theoretical study of the electronic structure of a heavily Si d-doped layer in a GaAs/ AlxGa1-xAs/GaAs quantum barrier. In this class of structures the effect of DX centers on the electronic properties can be tuned by changing the AlxGa1-xAs barrier width and/or the Al concentration, which leads to a lowering of the DX level with respect to the Fermi energy without disturbing the wave functions much. A self-consistent approach is developed in which the effective confinement potential and the Fermi energy of the system, the energies, the wave functions, and the electron densities of the discrete subbands have been obtained as a function of both the material parameters of the samples and the experimental conditions. The effect of DX centers on such structures at nonzero temperature and under an external pressure is investigated for three different models: (1) the DXnc0 model with no correlation effects, (2) the d+/DX0 model, and (3) the d+/DX- model with inclusion of correlation effects. In the actual calculation, influences of the background acceptors, the discontinuity of the effective mass of the electrons at the interfaces of the different materials, band nonparabolicity, and the exchange-correlation energy of the electrons have been taken into account. We have found that (1) introducing a quantum barrier into d-doped GaAs makes it possible to control the energy gaps between different electronic subbands; (2) the electron wave functions are more spread out when the repellent effect of the barriers is increased as compared to those in d-doped GaAs; (3) increasing the quantum-barrier height and/or the application of hydrostatic pressure are helpful to experimentally observe the effect of the DX centers through a decrease of the total free-electron density; and (4) the correlation effects of the charged impurities are important for the systems under study.