People have written novels that way, as for medication, results vary for different people as you can probably tell from all the responses.
Ritalin and Adderall can help. It depends on the dosage that you get from the doctor. I used to take Ritalin, and I know that I stopped eating, but they also told me it wouldn't work unless I 'wanted to focus.' I'm not really sure if I ever felt like a zombie. I probably with my ADD feel more like a space cadet most days staring off and just getting absorbed into some train of thought.
Rather then getting medicated, you can try to make a list of what you want to accomplish and just try and be a little more hard pressed to get it done, like keep reminding yourself. Use guilt if you have to. I find the caffeine helps me focus rather then over stimulating me. But that is just me.
I know that, for me, even removing distractions, I will find something to be distracted by. Like going to get a drink from the kitchen, I will wind up, lingering around the house and not quite making my way back to the PC, lol.
You could also set an alarm for when you walk away and give yourself a fifteen minute free period between 10 minute writing sessions.
I hope you find a solution to your problem. C: