Interpreting the statement in the sense that the sum over the rationals on the left hand side converges absolutely, then no, it is not possible.
Let $r_n$ be an enumeration of $\mathbb Q\cap [0,1]$ and let $p_n:=p(r_n)$.
Then $\sum_n p_n = 1$ (convergence is absolute). Let $\epsilon>0$ be given and let $N$ be such that $\sum_{n\geq N}|p_n|<\epsilon$.
Let $f$ be a continuous (or even $\mathcal C^{\infty}$) function $[0,1]\to[0,1]$ such that $f(r_n)=1$ for all $n<N$ and $\int_0^1 f(x) dx<\epsilon$.
Then,
$$
\int_0^1f(x)dx -\sum_{n\geq N} f(r_n)p_n=\sum_{n<N}p_n>1-\epsilon.
$$
On the other hand,
$$
\left|\int_0^1f(x)dx -\sum_{n\geq N} f(r_n)p_n\right|\leq 2\epsilon
$$
and if we start this argument with $\epsilon<1/3$ we reach a contradiction.