Compact integrated optical devices for optical sensor and switching applications by