Optimal Complexity in Byzantine-Robust Distributed Stochastic Optimization with Data Heterogeneity