Optimal Approximation Complexity of High-Dimensional Functions with Neural Networks