Merging acoustofluidic mixing with optofluidic integration, we have demonstrated a single-layer, planar, optofluidic switch that is driven by acoustically excited oscillating microbubbles. The device was found to have a switching speed of 5 Hz, an insertion loss of 6.02 dB, and an extinction ratio of 28.48 dB. With its simplicity, low fluid consumption, and compatibility with other microfluidic devices, our design could lead to a line of inexpensive, yet effective optical switches for many lab-on-a-chip applications.