We have used microelectromechanical systems (MEMS) to dynamically modulate synchrotron x-ray beams. By oscillating a small silicon crystal at 10s to 100s of kHz, we have demonstrated that the "time window" in which the Bragg condition is satisfied, and thus the time in which an x-ray pulse can be deflected by diffraction, can be significantly less than 1 ns. Here we discuss the optimization of x-ray optics to further improve device performance. We show that the time window can be reduced by matching the dispersion of a monochromator crystal to that of the MEMS crystal. We consider the case of an ideally perfect crystal and also treat the effects of strain and curvature, either of which broadens the crystal rocking curve and thus degrades the time window. A careful understanding of the effects of dispersion and x-ray wavelength produces time windows approaching the typical synchrotron pulse duration.