Optical control of the four-wave mixing dynamic grating structure in photorefractive media