Nowadays, to realize device sustainability and prolong device working time, energy harvest (EH) has been introduced into D2D communication networks that allow each D2D equipment (DUE) to harvest the radio frequency (RF) energy from the facilities in proximity. However, in such an EH-enabled D2D network, it is challenging to integrate EH with the device pairing mechanism that is critical to the performance of the network. To this problem, we propose an optimization algorithm in this paper that jointly optimizes the energy harvesting time and the pairing for each DUE in a close-form to obtain the maximum throughput of the EH-enabled D2D network. In the proposed algorithm, each DUE will go through two mutually influenced stages, i.e., EH stage and information transmit stage, in which the device pairing will take the energy status of the candidate DUEs into consideration. The numerical results demonstrate that the joint optimization algorithm has a significant increased throughput for the EH-enabled D2D network, compared with other benchmark solutions.