On-the-fly Preference Alignment via Principle-Guided Decoding