Digital optical switch based on amorphous silicon waveguide