The electronic transport properties of several Mg-doped GaAs nanowires are investigated. It is shown that Mg can be successfully used as a nontoxic and noncarcinogenic p-type dopant in GaAs nanowires. The doping levels, expanding over two orders of magnitude, and free holes mobility in the NW were obtained by the analysis of field effect transistors transfer curves. The study of the temperature dependence of the electrical resistivity of the nanowires shows that electronic transport changes from conduction of free holes, above room temperature, to variable hopping conduction at lower temperatures. Both, Mott and Efros-Shklovskii variable range hopping mechanism were clearly identified in the nanowires.