Charged spherically symmetric black holes in f(R) gravity and their stability analysis