Purpose: To investigate the impact of optimized beam angle selections on plan quality in intensity modulated proton therapy (IMPT) treatment planning for prostate cancer. Methods: In this study, we test a beam angle optimization (BAO) algorithm to find optimized beam numbers and configurations in IMPT treatment planning. Dose distributions on PTV and OARs for all treatment plans with two to four optimized beam angles are compared with ones with two lateral opposed beam angles in current practice. The sensitivity of weighting factors for the optimization objective is also investigated. Results: For three prostate cases, a unique set of two optimized beam angles was obtained for each case. Those optimized angle sets demonstrated advantages compared with the two lateral opposed angles currently used at our facility. Moreover, plans with three optimized beam angles significantly improved rectum sparing compared with two‐beam plans, while optimized four beam angles only achieved minor improvement of plan quality based on optimized three beam angles. Our algorithm then suggests a classic three‐beam configuration based on analyzing the optimal set of three beam angles. In addition, results shown that the proposed BAO algorithm is flexible enough to yield various angle plans based on the treatment planners' preferences for different objectives. Conclusions: This study shows that using optimized beam angles may improve IMPT treatment plan quality compared with current practice. In future research, by testing other cancer sites and incorporating uncertainties into the BAO algorithm, the automatic selection of optimal beam angles for IMPT treatment planning will become possible.