The term you're looking for is "low-residue diet" or "low-residue meal" (for some reason, the medical community tends to avoid the term "poop" in their technical terminology). Simply googling on those terms will get you a lot of good advice; WebMD and Wikipedia are good starting points.
A low residue diet is a diet designed to reduce the frequency and
volume of stools while prolonging intestinal transit time.
In general, you'll want to avoid dietary fibre. Minimize wholegrains, fruit, vegetables, and seeds. Tender meat, eggs, and dairy are good choices. Carbs should be of the heavily refined variety -- for example, white bread and white pasta. Pilots on long missions traditionally go for steak and eggs as their pre-flight meal.
Note that full digestion (from eating to defecation) can take well over 24 hours, so start your low-residue diet a day or two in advance.
Finally, I would very strongly advise to have a plan B! No matter how carefully you plan your diet, you can't 100% guarantee sealed bowels for your entire hike, and in that case it's much better to be prepared. If you're in a no-poop zone, carry a WAG bag, poop tube, or similar. A minimal poop pack-out kit doesn't weigh much, and everyone will feel happier knowing it's there even if nobody expects to use it.