Learning receptive field properties in a biologically plausible model of primary visual cortex