Control of brain state transitions with light