Those two sentences are grammatically correct, but they give less information.
'Ten years ago, I could run around the lake within half an hour '
This is simply a statement about the past. It says nothing about the present time.
'If it had been ten years ago , I could have run around the lake within half an hour.'
and 'Ten years ago , I could have run around the lake within half an hour.' mean more or less the same. The implication is that they can't run so fast now. The only difference is the phrase 'If it had been', which suggests that maybe the speaker has just tried to run round the lake and it took them much longer.