The lawmakers expressed concern that McDonald’s uses machine learning algorithms to generate what the company calls the “optimal price” recommendations for each menu item.