Optical switches are one of the most important elements of integrated photonics. Here, we designed, fabricated and characterized several nanophotonic optical switches (NOSs) in silicon that exhibit ultra-compact footprint, along with excellent extinction ratios and operating bandwidths. Simulations indicate that our best device of dimensions 3umX3um and 0.3um device height can provide about 10dB extinction ratio with a bandwidth of 12nm, centered at the design wavelength of 1550nm. Three-dimensional finite-difference time-domain analysis in conjunction with a modified version of direct binary search algorithm was used to design the nanophotonic device structure. The modulation is a result of optical modulation of the refractive index of a photochromic material and an optimized geometry of the digital metamaterials that comprise the device. The devices are CMOS fabrication compatible and examples of ones designed using multi-state geometric optimization that will lead to a new class of ultra-compact and multi-functional active integrated-silicon devices.