By combining optical and genetic methods, optogenetics has become a very important tool in neuroscience research for manipulating neuron activities. The rapid development of novel opsins and fluorescent indicators has introduced a large palette of biochemical probes for optogenetic stimulation and cellular imaging, which makes the all-optical neural circuit excitation and neural activity recording possible. Compared to visible-light illumination, two-photon excitation and imaging avoids the crosstalk from optogenetic probes and calcium sensors, and provides for deeper penetration and higher spatial-temporal resolution for single-cell-level precise manipulation. Two-photon interactions frequently necessitate the use of high-power sources with narrow bandwidth outputs. Although tunable sources, such as the titanium-sapphire laser, offer some degree of flexibility, multiple bulky and expensive lasers are required for simultaneous two-photon optogenetic stimulation and calcium imaging. Here, we propose to use fiber-based supercontinuum generation as a broadband coherent light source for two-photon excitation and imaging. A custom-made photonic crystal fiber is pumped by a Yb:KYW laser (1041 nm, 220 fs, 80 MHz) to generate a femtosecond output with a wide range of wavelengths, 900 - 1170 nm, which covers most of the two-photon excitation wavelengths of the molecules used in optogenetics, e.g. C1V1-2A-mCherry and GCaMP6s in our study. A pulse shaper is utilized to modulate the phases of partial wavelengths to tailor the temporal shape of the femtosecond pulse, which manipulates the absorption of optogenetic probes and provides a unique approach for controllable optogenetic excitation. Video-rate calcium imaging results suggest that spectral-temporal programmable supercontinuum pulses provide a powerful tool for neural network activity research.