Make use of backreferences:
sed -r 's/(\bd[0-9]+)\.(h[0-9]+)/\1\2/' inputfile
For your sample input, it'd yield:
My.File.d01h01.txt
My.New.File.d01h02.txt
My.Another.File.d01h03.txt
My.Yet.Another.File.d01h04.txt
File.d01h05.txt
Either check for a word boundary before d
or ensure that it's preceded by a .
:
sed -r 's/(\.d[0-9]+)\.(h[0-9]+)/\1\2/' inputfile