In this work, we address the trajectory optimization of a fixed-wing unmanned aerial vehicle (UAV) using free space optical communication (FSOC). Here, we focus on maximizing the flight time of the UAV by considering practical constraints for wireless UAV communication, including limited propulsion energy and required data rates. We find optimized trajectories in various atmospheric environments (e.g., moderate-fog and heavy-fog conditions), while also considering the channel characteristics of FSOC. In addition to maximizing the flight time, we consider the energy efficiency maximization and operation-time minimization problem to find the suboptimal solutions required to meet those constraints. Furthermore, we introduce a low-complexity approach to the proposed framework. In order to address the optimization problem, we conduct a bisection method and sequential programming and introduce a new feasibility check algorithm. Although our design considers suboptimal solutions owing to the nonconvexity of the problems, our simulations indicate that the proposed scheme exhibits a gain of approximately 44.12% in terms of service time when compared to the conventional scheme.