The effect of variations in the rate of ionization of neutral chemical species by cosmic rays, ζ, on the abundances of some observed molecules in the dense cores of dark molecular clouds is studied. Changes in molecular abundances accompanying an increased (decreased) ionization rate have a single origin: the acceleration (deceleration) of processes that are affected directly or indirectlybychemical reactions with charged species. In addition to affecting the gas-phase chemistry, an increased cosmic-ray flux leads to the more efficient destruction of dust-grain mantles and also accelerates the freezing of some components onto dust. In particular, in a model with an increased ζ, the destruction of the volatile N2 molecule by ionized helium leads to the rapid accumulation of nitrogen atoms in dust-phase ammonia, which has a higher desorption energythan N2. As a result, the gas-phase abundance of NH3 and N2H+ decreases significantly. This mechanism can explain the unusual chemical structures of some dense globules, such as B68, where surprisingly low abundances of nitrogen-bearing molecules are observed together with a central drop in the NH3 and N2H+ column densities. Observations of clouds in HCN and HNC lines can discriminate between the two possible origins of the reduced NH3 and N2H+ abundances: an increased cosmic-ray flux or N2 freezing due to the higher desorption energy of this molecule.