Magnetic sensors developed for application in magnetoencephalography must meet a number of requirements; the main ones are compactness, sensitivity and response speed. We present a quantum optically pumped atomic sensor with cell volume of 0.5cm3 that meets these requirements and is operable in nonzero magnetic fields. The ultimate sensitivity of the sensor was estimated as (using the criteria of the ratio of the slope of the magnetic resonance signal to the shot noise spectral density) to be better than 5 fT/Hz1/2. The actual sensitivity, measured in a gradiometric scheme, reaches 13 fT/Hz1/2 per sensor. We also present a novel and fast algorithm for optimization of the geometric properties of non-zero field sensor array with respect to maximization of the information transfer rate for cortical sources.