Mr. Meltzer played a leading role in the administration’s efforts to close the military prison at Guantanamo Bay, Cuba, and related policies affecting terrorism detainees. He was also the White House’s main contact with the Justice Department’s powerful Office of Legal Counsel, which evaluates whether proposed policies would be lawful.