Effect of the domain geometry on the existence of multipeak solutions for an elliptic problem