FORS2/VLT survey of Milky Way globular clusters I. Description of the method for derivation of metal abundances in the optical and application to NGC 6528, NGC 6553, M 71, NGC 6558, NGC 6426, and Terzan 8