Photoelectrical devices for stimulating neurons