You can get a closed-form answer.
$$\int_0^1 a^p (1-a)^{1-p} b^{1-p} (1-b)^p dp = b(1-a) \int_0^1 \left(\frac{a(1-b)}{b(1-a)}\right)^p dp = \left. \frac{b(1-a)}{\ln \frac{a(1-b)}{b(1-a)}} \left(\frac{a(1-b)}{b(1-a)}\right)^p \right|_0^1 $$
$$= \frac{a(1-b) - b(1-a)}{\ln a + \ln (1-b) - \ln b - \ln (1-a)} = \frac{a-b}{\ln a + \ln (1-b) - \ln b - \ln (1-a)}.$$
This holds if $a \neq b$ and if neither of $a$ or $b$ is 0 or 1. If $a = b$, then instead we have $$a(1-a) \int_0^1 dp = a - a^{2}.$$
And, of course, if $a$ or $b$ is 0 or 1 then the value of the integral is 0.
So, as far as maximizing, you can use the usual approach of finding where both partial derivatives are 0. I haven't worked through the calculations, but I strongly suspect that because of the symmetry in $a$ and $b$ that the maximum value will occur at $a = b$.