Could be hydraulic lifters sticking or collapsing. My M50 525i sounded like an old VW beetle under acceleration before I went and replaced my lifters. Although lifters would most probably still be knocking when the engine's cold....
I dunno, I'm not a mechanic, others in here would probably be able to give you a better reply than I...