This is again too long for a comment:
Let $a=-f'(0),\ b=-f'(1),\ c=f''(0),\ d=-f''(1)$. Since $f$ is convex on $[0,p]$ and concave on $[p,1]$ we also know $f''(p)=0$.
So, if $f$ is a polynomial, then $f''(x)$ is of the form $$f''(x)=(p-x)\left(\frac{c(1-x)}{p}+\frac{dx}{1-p}+x(1-x)q(x)\right)$$ for some polynomial $q(x)$ such that $f''(x)/(p-x)$ is positive on $[0,1]$.
Then there are only four more remaining conditions on $f''$ to solve the problem:
$$-f'(p) + \int_0^p f''(x)\, dx = a$$
$$f'(p) + \int_p^1 f''(x)\, dx = -b$$
$$\int_p^1 \left(f'(p) + \int_p^u f''(x)\, dx\right)\, du = 0$$
$$\int_0^p \left(f'(p) - \int_u^p f''(x)\, dx\right)\, du = 0$$
So one approach is to try $q(x)$ of the form $$q(x)=r x^i + s (1-x)^j + tx(1-x)$$ and solve the four equations above for $r,s,t$ and $f'(p)$.
The integrals are easy. Solving the equations is easy. Ensuring the positivity of $f''(x)/(p-x)$ is difficult. But if we can choose $i$ and $j$ to make $r,s,t$ positive, that will be enough. The trick is finding how $i$ and $j$ can depend on $a,b,c,d$ to get this positivity, or getting something similar for another form of $q(x)$.