Sounds like you are interested in Optho or Cardiology. Both fields are academic in nature, at least for training, and so research would be a big plus.
Optho is more competitive than IM, so all else being equal, I would go for Optho research. Having abstracts or even publications will be a big deal when applying to Optho programs.
If you eventually decide to apply for IM, having Optho research will still be a big plus, at least for academic programs. While a resident you can then transition to research in a subspecialty to help with your fellowship application.
However, while Optho programs may find your Cards research to be a plus, they are competitive enough that many students already will have been plugged into optho research.