Spontaneous polarization induced electric field in zinc oxide nanowires and nanostars