Can Molecular Foundation Models Know What They Don't Know? A Simple Remedy with Preference Optimization