A Federation base would have access to Federation transponder codes which make it easier to track its own vessels beyond standard sensor range, although I'm not clear how this works or how it would help you beam on board since you couldn't scan the inside of the ship for a safe zone, which is tantamount to suicide. I can see it working better if a ship is at sub-light and two pads are linked to double the range. It is also possible to obtain the codes of other ships through espionage or luck (happened in DS9) and if all you are beaming is an explosive you don't really need to be all that accurate.
Generally, I don't think transporting over a long distance would work on ships at warp without possessing the other ship's transponder code unless you are close enough to scan and be scanned, in which case you run into problems with shields. At sub-light it is less of a problem but you still need to be aware of the ship's position. A cloaked ship could probably use this as a valid tactic since its shields are down while cloaked and if the transporter has a greater range than your enemies weapons, beaming across a bomb is a great opener to a fight.
Generally, I don't think transporting over a long distance would work on ships at warp without possessing the other ship's transponder code unless you are close enough to scan and be scanned, in which case you run into problems with shields. At sub-light it is less of a problem but you still need to be aware of the ship's position. A cloaked ship could probably use this as a valid tactic since its shields are down while cloaked and if the transporter has a greater range than your enemies weapons, beaming across a bomb is a great opener to a fight.