Yes, a firm in perfect competition would achieve the highest possible profit (which would be zero economic profit) if it produced at the quantity of productive efficiency. This is because its costs would be as low as possible.
Productive efficiency is achieved when a firm is able to make the maximum possible output (value wise) at the minimum possible cost. This is essential for a firm in perfect competition because it is a price taker. The firm in perfect competition will have to accept whatever the market price is because it is selling a homogenous product and buyers can simply buy from someone else if the firm raises prices.
Therefore, the only way for a firm to make the maximum possible profit is to make as much product as possible at the lowest possible cost. If the firm has costs that are too high, it loses profit because it cannot raise its prices to compensate. If it does not produce as much as it could at the lowest cost, it loses profit because it will not sell as much as it could have. For these reasons, producing at the quantity of productive efficiency is the best thing that a firm in perfect competition can do.