Bridging the Gap: Self-Optimized Fine-Tuning for LLM-based Recommender Systems