Olfaction is an important neural system for survival and fundamental behaviors such as predator avoidance, food finding, memory formation, reproduction, and social communication. However, the neural circuits and pathways associated with the olfactory system in various behaviors are not fully understood. Recent advances in optogenetics, high-resolution in vivo imaging, and reconstructions of neuronal circuits have created new opportunities to understand such neural circuits. Here, we generated a transgenic zebrafish to manipulate olfactory signal optically, expressing the Channelrhodopsin (ChR2) under the control of the olfactory specific promoter, omp. We observed light-induced neuronal activity of olfactory system in the transgenic fish by examining c-fos expression, and a calcium indicator suggesting that blue light stimulation caused activation of olfactory neurons in a non-invasive manner. To examine whether the photo-activation of olfactory sensory neurons affect behavior of zebrafish larvae, we devised a behavioral choice paradigm and tested how zebrafish larvae choose between two conflicting sensory cues, an aversive odor or the naturally preferred phototaxis. We found that when the conflicting cues (the preferred light and aversive odor) were presented together simultaneously, zebrafish larvae swam away from the aversive odor. However, the transgenic fish with photo-activation were insensitive to the aversive odor and exhibited olfactory desensitization upon optical stimulation of ChR2. These results show that an aversive olfactory stimulus can override phototaxis, and that olfaction is important in decision making in zebrafish. This new transgenic model will be useful for the analysis of olfaction related behaviors and for the dissection of underlying neural circuits.