This paper discusses free carrier generation by pulsed laser fields as a mechanism to switch the optical properties of semiconductor photonic crystals and bulk semiconductors on an ultrafast time scale. Requirements are set for the switching magnitude, the time-scale, the induced absorption as well as the spatial homogeneity, in particular for silicon at lambda= 1550 nm. Using a nonlinear absorption model, we calculate carrier depth profiles and define a homogeneity length l_hom. Homogeneity length contours are visualized in a plane spanned by the linear and two-photon absorption coefficients. Such a generalized homogeneity plot allows us to find optimum switching conditions at pump frequencies near v/c= 5000 cm^{-1} (lambda= 2000 nm). We discuss the effect of scattering in photonic crystals on the homogeneity. We experimentally demonstrate a 10% refractive index switch in bulk silicon within 230 fs with a lateral homogeneity of more than 30 micrometers. Our results are relevant for switching of modulators in absence of photonic crystals.