The Justice Department has sent a warning to the publisher of a book written by a senior Trump administration official who wrote an anonymous New York Times essay.