Yes it will work, the same way summarization works. When a router summarizes subnets, it lowers the mask to include many subnets represented in the same mask. 10.1.x.x/30 all the way down to 10.1.x.x/17 would work for this gateway. Administrators do this all the time with static routes to lower the size of the routing tables in the routers.
Burt