Get some 3M 300 LSE tape (available on the 'bay). It's used for sticking rubber grips onto camera bodies, etc. Alternatively, same tape is used by cell phone repairers to stick on smartphone glass screens (got a roll at Microcenter). Make sure to clean both the rubber and the body with rubbing alcohol (and I use Fantastik on a paper towel first) to remove any oils and residues. I would not use glue, as the grips are removed for service.
The other option is to get a genuine replacement rubber grip from Nikon itself--go on their website and the price is actually quite reasonable. The replacements come with sticky tape already installed--just peel and install (after prepping). I would go for the genuine stuff, as non OEM grips on the 'bay were absolutely garbage when I did a D300s a few months back (nothing fit right, very poor quality, even the sticky tape didn't work). The new rubber grips from Nikon made my very used D300s look quite good again.