In this paper, we consider the minimization of a relevant energy consumption related cost function in the context of sensor networks where correlated sources are generated at various sets of source nodes and have to be transmitted to some set of sink nodes. The cost function we consider is given by the product [rate] × [link weight]. The minimization is achieved by jointly optimizing the transmission structure, which we show consists of a superposition of trees from each of the source nodes to its corresponding sink nodes, and the rate allocation across the source nodes. We show that the overall minimization can be achieved in two concatenated steps. First, the optimal transmission structure has to be found, which in general amounts to finding a Steiner tree and second, the optimal rate allocation has to be obtained by solving a linear programming problem with linear cost weights determined by the given optimal transmission structure. We also prove that, if any arbitrary traffic matrix is allowed, then the problem of finding the optimal transmission structure is NP-complete. For some particular traffic matrix cases, we fully characterize the optimal transmission structures and we also provide a closed-form solution for the optimal rate-allocation. Finally, we analyze the design of decentralized algorithms in order to obtain exactly or approximately the optimal rate allocation, depending on the traffic matrix case. For the particular case of data gathering, we provide experimental results showing a good performance in terms of approximation ratios.