Hello,
Practically speaking, I cannot find any difference between the two.
You can use both, but at the end of the day, you will be able to utilize each of them according to the context.
In other words, 공헌(貢獻) is from chinese characters (한자어), whereas 이바지 is a word purely from Korean (순한글말).
Hope this helps! :)