In this work, we experimentally study the effects of the nitrogen concentration in laser wakefield acceleration of electrons in a gas mixture of hydrogen and nitrogen. A 15 TW peak power laser pulse is focused to ionize the gas, excite a plasma wave and accelerate electrons up to 230 MeV. We find that at dopant concentrations above 2% the total divergence of the electrons is increased and the high energy electrons are emitted preferentially with an angle of±6 mrad, leading to a forked spatio-spectral distribution associated to direct laser acceleration (DLA). However, electrons can gain more energy and have a divergence lower than 4 mrad for concentrations below 0.5% and the same laser and plasma conditions. Particle-in-cell simulations show that for dopant concentrations above 2%, the amount of trapped charge is large enough to significantly perturb the plasma wave, reducing the amplitude of the longitudinal wakefield and suppressing other trapping mechanisms. At high concentrations the number of trapped electrons overlapping with the laser fields is increased, which rises the amount of charge affected by DLA. We conclude that the dopant concentration affects the quantity of electrons that experience significant DLA and the beam loading of the plasma wave driven by the laser pulse. These two mechanisms influence the electrons final energy, and thus the dopant concentration should be considered as a factor for the optimization of the electron beam parameters.