Imam al-Shafi’i set the standard for loving Sayidena Abu Bakr and Sayidena Ali and showed how there is no conflict in doing so(from The Perfect Family p61):
If we speak well of ʿAlī, we will be called Rawāfiḍ[1]
And the ignorant fools will accuse us of tafḍīl[2];
If we speak of the virtues of Abū Bakr,
We will be accused of naṣb[3] merely by mentioning them.
It seems that, because of how I love them both,
I will be guilty of rafḍ and naṣb until the day I die!
Al-Bayhaqī said, ‘Al-Shāfiʿī only said this when the Khawārij jealously and unjustly accused him of being a Rāfiḍī.’
[1] The Rawāfiḍ were the ones who refused [rafaḍū] to accept the Caliphates of Abū Bakr, ʿUmar and ʿUthmān.
[2] Tafḍīl means to consider ʿAlī superior to all the other Companions
[3] Naṣb means jealous hatred of the Prophet’s s Family.