Monte Carlo lattice simulation of amphiphilic systems in two and three dimensions