Monte Carlo studies for the optimization of the Cherenkov Telescope Array layout