The IEEE 802.15.4 and RPL standards are commonly used for MAC and routing in wireless sensor networks, respectively. In single-hop networks, duty cycling is supported by the beacon-enabled mode of 802.15.4. In multi-hop networks, 802.15.4 uses a cluster-tree while RPL is based on a DoDAG structure. Several studies report that the performance of RPL over clustertree-based 802.15.4 degrades due to the incompatibility of these structures. In this paper, we propose a dynamic parent selection in RPL that takes both load and energy constraints into consideration. We base our work on a modified cluster-tree MAC, which is compatible with RPL and permits selecting multiple parents. For each packet, we select the preferred parent based on a composite metric incorporating remaining energy and recent load on paths to the sink. Simulation results show that our mechanism extends network lifetime and improves network performance in terms of end-to-end delay and packet delivery ratio.