The dirt bike game you're thinking of, the one from Windows 95 where you had to collect apples to pass each level, is called Elasto Mania. It's a long-running favorite known for its tricky, physics-based tracks and that memorable apple-collecting goal.