The integration of dynamic Flying Ad hoc Networks (FANETs) and millimeter Wave (mmWave) technology can offer a promising solution for numerous data-intensive applications, as it enables the establishment of a robust flying infrastructure with significant data transmission capabilities. However, to enable effective mmWave communication within this dynamic network, it is essential to precisely align the steerable antennas mounted on Unmanned Aerial Vehicles (UAVs) with their corresponding peer units. Therefore, it is important to design a novel approach that can quickly determine an optimized alignment and network topology. In this paper, we propose a Generative Adversarial Network (GAN)-based approach, called WaveGAN, for FANET topology optimization aiming to maximize the network throughput by selecting the communication paths with the best channel conditions. The proposed approach consists of a WaveGAN model followed by a beam search. The former learns how to generate optimized network topologies from a supervised dataset, while the latter adjusts the generated topologies to meet the structure requirements of the mmWave-based FANET. The simulation results show that the proposed approach is able to quickly find FANET topologies with a very small optimality gap for different network sizes.