Here's how you do it.
First, notice that for any state $|\psi\rangle$, we have \begin{align} \langle p|[\hat x, \hat p]|\psi\rangle &= \langle p|\hat x\hat p-\hat p\hat x|\psi\rangle \\ &= \langle p|\hat x\hat p|\psi\rangle - \langle p|\hat p \hat x|\psi\rangle \\ &= \langle p|\hat x \hat p|\psi\rangle - p\langle p|\hat x|\psi\rangle \end{align} Now, recall the canonical commutation relation between $\hat x$ and $\hat p$; \begin{align} [\hat x, \hat p] &= i\hbar \hat I \end{align} where $\hat I$ is the identity operator. Using this fact on the left hand side of the manipulation we just performed, and doing a little rearranging, we find that \begin{align} p\langle p|\hat x|\psi\rangle = \langle p|\hat x \hat p|\psi\rangle -i\hbar\langle p|\psi\rangle. \tag{1} \end{align} Now, focus on the first term on the right. we have \begin{align} \langle p|\hat x \hat p|\psi\rangle &= \int dx\,\langle p|\hat x|x\rangle\langle x|\hat p|\psi\rangle \\ &= \int dx\, x e^{ipx/\hbar}\left[-i\hbar \frac{d}{dx}\psi(x)\right] \\ &= i\hbar \int dx\, \frac{d}{dx}(xe^{ipx/\hbar})\psi(x) \\ &= i\hbar \int dx\, e^{ipx/\hbar}\psi(x) + i\hbar\int dx\,x\left(\frac{ip}{\hbar}\right)e^{ipx/\hbar}\psi(x) \\ &= i\hbar\psi(p) -p\int dx\,xe^{ipx/\hbar}\psi(x)\\ &= i\hbar\psi(p)+i\hbar p\frac{d}{dp}\int dx\,e^{ipx/\hbar}\psi(x) \\ &= i\hbar\psi(p)+i\hbar p \frac{d}{dp}\psi(p) \tag{2} \end{align} where we have made liberal use of integration by parts, and the following identities: \begin{align} \int dx\, |x\rangle\langle x| = \hat I, \qquad \psi(x) \overset{\mathrm{def}}{=} \langle x|\psi\rangle, \qquad \psi(p) \overset{\mathrm{def}}{=} \langle p|\psi\rangle,\qquad \langle x|\hat p|\psi\rangle = -i\hbar\frac{d}{dx}\psi(x). \end{align} The last fact is precisely the statement that the position space representation of the momentum operator is $-i\hbar d/dx$. Now combine $(1)$ and $(2)$ to obtain \begin{align} p\langle p|\hat x|\psi\rangle = i\hbar p\frac{d}{dp}\psi(p) \end{align} Next, we simply note that if we denote the momentum space representation of the position operator as $D^{(p)}(\hat x)$, then by definition \begin{align} D^{(p)}(\hat x)\psi(p) = \langle p|\hat x|\psi\rangle, \end{align} Combining this with $(3)$, assuming $p\neq 0$, and dividing both sides by $p$, we obtain the desired result; \begin{align} D^{(p)}(\hat x) = i\hbar \frac{d}{dp} \end{align} I'm not entirely sure how to deal with the case $p=0$, but I'm guessing this is a technicality whose non-resolution you can live with temporarily.