This paper addresses the problem of efficient data gathering based on distributed source coding (DSC) in wireless sensor networks (WSNs) with a complexity constrained data gathering node (DGN). A particular scenario of interest is a cluster of low complexity sensor nodes among which, one node is selected as the cluster head (CH) or the DGN. Utilizing DSC allows for reducing the required rate of communications by exploiting the dependency between the nodes observations in a distributed manner. We consider a DSC-based rate allocation structure, which takes into account the CH (DGN) memory and computational constraints. Specifically, this is accomplished, respectively, by limiting the number of nodes whose data may be stored at the CH and exploited during decoding, and the number of nodes that can be jointly (de)compressed using DSC. Based on this structure, we investigate two WSN resource optimization problems aiming at: (i) minimizing the total network cost and (ii) maximizing the network lifetime. To these ends, optimal dynamic programming solutions based on a trellis structure are proposed that incur substantially smaller computational complexity in comparison to an exhaustive search. Also, a suboptimal yet high performance solution is presented whose complexity grows in polynomial order with the number of network nodes. Numerical results demonstrate that the proposed rate allocation structure and solutions, even with limited complexity, allow for exploiting most of the available dependency and hence the achievable compression gain.