Theoretical and experimental investigations of the optical waveguiding properties of on-chip microfabricated capillaries