A spectroscopic study of the globular cluster M28 (NGC 6626)