Doped catalyst-free GaAs nanowires have been grown by molecular beam epitaxy with the gallium-assisted method. The spatial dependence of the dopant concentration and resistivity have been measured by Raman spectroscopy and four point electrical measurements. Along with theoretical considerations, the doping mechanisms have been revealed. Two competing mechanisms have been revealed: dopant incorporation from the side facets and from the gallium droplet. In the latter incorporation path, doping compensation seems to play an important role in the effective dopant concentration. Hole concentrations of at least 2.4 x 10(18) cm(-3) have been achieved, which to our knowledge is the largest p doping range obtained up to date. This work opens the avenue for the use of doped GaAs nanowires in advanced applications and in mesoscopic physics experiments.