Optimal Rates in Distributed Optimization