Shape dependence of holographic Rényi entropy in general dimensions