Coupled mode equations and gap solitons in higher dimensions