Waveguide-based optofluidics