I can't keep sweet stuff in the house either - or at least, I couldn't until I was diagnosed with T2 diabetes in June, that's made me afraid of sugar. I don't recommend being frightened of food, that's not healthy but it's certainly helped.
Is Optifast one of those meal replacement things? Did you choose it or has a doctor recommended it to you? I'm asking because I don't want to contradict medical advice.
How many calories a day do you consume in total? When I started losing weight (this time) in June last year, I was eating 1,200 calories. Well, allegedly 1,200 but often 1,000 and sometimes 900. Lower=better, right? (no). Lost OK, though was often tiredish. I saw the specialist diabetes dietician in September, and she said I should be eating at least 1,300, and to eat some more starchy carbs. I thought she was insane; or at least just quoting from some textbook, stick-insect, young, inexperienced dietician that she was. To my surprise, the weight's continued to come off, and I have a lot more energy for exercising. My exercising is entirely walking at the moment but it's working well.
Would a low-GI plan work for you? Combined with calorie counting, it means that nothing is out of bounds - though choosing not to have trigger foods in the house is also sensible. It also means getting the "right" kind of carbs for energy, so that you feel good and your skin and hair look good while you're losing weight. Plus, it's easier to incorporate into a lifestyle for life, rather than a Diet to stop as soon as you've lost the weight.
In terms of motivation, I started by having one good day, then working up to two good days, then three, and so on. Once the weight begins to come off, it gets more difficult to spoil it by falling off the waggon - although one slip, one binge is just that, only one, the waggon's available to get back on again.
Good luck, and hugs