What model macbook is it? If your model supports “super drives” (the mac DVD burner), then you should be able to bring it in to an apple store and get it replaced. You’ll be charged for the labor as well as the drive itself, but that’s the only way that won’t void your warranty.
If you don’t want to pay the extra, just get an external one.