Can't see why not.
I did the same thing flying back from the US to Gatwick and then (not) onwards to Dublin (admittedly not BA) I just made sure I had a decent gap between the two flights and told check in to only tag my bags to London as I'd be wanting a shower and change of clothes before flying on to Dublin. I wouldn't do it with the same carrier on a regular basis in case it got picked up on-but for a one off I would.