The idea here is to consider the convex set $F$ of measurable functions $f\colon\R^n\to[0,1]$ such that the one-dimensional marginals of $f(x)\,dx$ are $cp(t)\,dt$ for some real $c>0$$c:=1/\|p\|_\infty^n$. The set $F$ is nonempty, because the function $f$ given by $f(x_1,\dots,x_n)\equiv p(x_1)\cdots p(x_n)/\|p\|_\infty^n$$f(x_1,\dots,x_n)\equiv cp(x_1)\cdots p(x_n)$ is in $F$. If now $F$ has an extreme point, it remains to show that any function in $F$ that is an extreme point of $F$ takes only values $1$ or $0$ almost everywhere (which looks very plausible, at least). Indeed, such an extreme point of $F$ coincides almost everywhere with the indicator of a measurable subset $A$ of $\R^n$ of nonzero Lebesgue measure such that each one-dimensional marginal of the uniform distribution $\U_A$ over $A$ is $\mu(dt)=p(t)\,dt$. This idea can of course be generalized to more general marginals.