In this paper, we propose an optimized lightweight Federated Deep Learning (FDL) method for botnet attack detection in smart critical infrastructure. First, an optimization method is developed to determine the most appropriate combination of model hyperparameters for local Deep Learning (DL) at the edge nodes. Then, an oversampling algorithm is combined with the optimal DL model to improve the classification performance when the training data is highly imbalanced, without a significant increase in the overall computation time. Furthermore, a feature dimensionality reduction method is used to reduce the amount of memory space required to store the network traffic data at the edge nodes.