There is no way to achieve this by CSS alone, without a bit of hackery.
If each link only contains images or text, you can solve it by putting a class on the links that contain images (or text, whichever you have fewer of).
If some links contain text and an image, you can wrap a <span> round the text and style that rather than the link itself.
If you don't want to do either of those and your images don't have a transparent background, you can use position:relative; to shift them downwards so that they overlap the border and hide it. If you don't want to actually move the images, you can use padding and set a background-color on the images to simulate the effect.