The cavernous nerves (CN) course along the prostate surface and are responsible for erectile function. Improved identification and preservation of the CN's is critical to maintaining sexual potency after prostate cancer surgery. Noncontact optical nerve stimulation (ONS) of the CN's was recently demonstrated in a rat model, in vivo, as a potential alternative to electrical nerve stimulation (ENS) for identification of the CN's during prostate surgery. However, the therapeutic window for ONS is narrow, so optimal design of the fiber optic delivery system is critical for safe, reproducible stimulation. This study describes modeling, assembly, and testing of an ONS probe for delivering a small, collimated, flat-top laser beam for uniform CN stimulation. A direct comparison of the magnitude and response time of the intracavernosal pressure (ICP) for both Gaussian and flat-top spatial beam profiles was performed. Thulium fiber laser radiation (λ=1870 nm) was delivered through a 200-μm fiber, with distal fiber tip chemically etched to convert a Gaussian to flat-top beam profile. The laser beam was collimated to a 1-mm-diameter spot using an aspheric lens. Computer simulations of light propagation were used to optimize the probe design. The 10-Fr (3.4-mm-OD) laparoscopic probe provided a constant radiant exposure at the nerve surface. The probe was tested in four rats, in vivo. ONS of the CN's was performed with a 1-mm-diameter spot, 5- ms pulse duration, and pulse rate of 20 Hz for a duration of 15-30 s. The flat-top laser beam profile consistently produced a faster and higher ICP response at a lower radiant exposure than the Gaussian beam profile due, in part, to easier alignment of the more uniform beam with nerve. With further development, ONS may be used as a diagnostic tool for identification of the CN's during laparoscopic and robotic nerve-sparing prostate cancer surgery.