Quantum dot infrared photodetectors (QDIPs) have attracted significant attention due to selective photoresponse, high photoconductive gain, and numerous possibilities for nanoscale engineering of photoelectron processes, which control the detector characteristics. Our approach to improving QDIP performance is based on optimization of three dimensional nanoscale potential profile created by charged quantum dots (QDs). Nanoscale profile around QDs allows us to control photoelectron capture processes, which determines the photoelectron lifetime, detector operating speed, responsivity, the spectral density of noise, noise bandwidth, and the detector dynamic range. The nanoscale potential profile is determined by doping of QDs and inter-dot space. In this work, we study various ways of selective doping and its effects on characteristics of photodetectors. We investigate and compare intra-dot doping, inter-dot doping, and complex bipolar doping. To investigate effects of selective doping, we fabricated AlGaAs/InAs QD structures with n-doping of QD layers, structures with n-doping of barriers, and structures with p-doping of QD layers and n-doping of interdot space. We measured dark current, spectral photoresponse, voltage dependence of responsivity, and noise characteristic. The photoresponse is improved due to photon-electron coupling, which increases with QD filling by electrons. However, the noise current also increases due to increase in QD filling. Therefore, possibilities for improvement of QDIP structures with unipolar doping are very limited. Our results show that spectral photoresponse, responsivity, and detector sensitivity are substantially improved due to bipolar doping, which provides decoupled control of electron filling of QDs and the potential barriers around QDs.