Some windows require a 1/4 space for movement. Do you know what the manufacturer's instructions were or have one of the pamphlets to review. Otherwise you should be fine although you will need to make sure the flashing details will work. Understand that the caulking should only be a secondary and not a primary defense against water infiltration.