If $k$ is not algebraically closed, such a polynomial always exists (the opposite is also true and is mentioned in the post). 

We may assume that $a_i=0$ for all $i$. Take an irreducible polynomial $g(x)$ of degree $d>1$, then for a homogeneous form $G(x,y)=y^dg(x/y)$ we have $G(x,y)=0$ if only if $x=y=0$. This solves the case $n=2$, for $n=3$ consider the polynomial $G(G(x,y),z)$, it takes zero value only when $x=y=z=0$, and so on.