Analysis and Optimization of Wireless Federated Learning with Data Heterogeneity