We consider a model for random-access communication in networks of arbitrary topology. We characterize the efficient (Pareto) boundary of the network throughput region as the family of solutions optimizing weighted proportional fairness objective, parameterized by link weights. Based on this characterization we propose a general distributed scheme that uses dynamic link weights to "move" the link-throughput allocation within the Pareto boundary to a desired point optimizing a specific objective. As a specific application of the general scheme, we propose an algorithm seeking to optimize weighted proportional fairness objective subject to minimum link-throughput constraints. We study asymptotic behavior of the algorithm and show that link throughputs converge to optimal values as long as link dynamic weights converge. Finally, we present simulation experiments that show good performance of the algorithm.