Can they though? Is congress allowed to control how much profit a company can make on the market?
Yes, why wouldn’t they be?
One of Congress's powers is to regulate interstate commerce. The scope of that power has been stretched to be commically large; but profit controls in the gas market clearly fall within that power.
Price/profit controls have been done numerous times in the US to verying degrees of success.