Sure, you can make the speakers deeper and shorter. When adding to the depth, make sure to reduce the size of your other dimensions accordingly. Find the volume of your current calculations, and just make sure that any changes you make multiply out to the same volume. If you have a certain depth in mind, choose either the width or height you want as well, and plug in x for the other variable. Set the whole equation equal to your volume, and you'll have the dimension for your other side. For example
If you want your height to be 20 cm, and your depth to be 60 cm with a volume of 48000 cm^3, your equation would be
20 * 60 * X = 48000, which would give you a width of 40 cm to meet the necessary volume.
As long as your internal volume stays the same, you should have no problem. Just make sure to compensate for any added bracing, the volume the drivers occupy, and for extremeists, any stuffing or lining you use. Also make sure that if the enclosure is ported, that the port length doesnt exceed the internal dimensions of the box. Good luck!
Bryan