Help please with calorie balance

Hi all,
I have lost 61 pounds and to get these last 25 or so pounds off my Dr. wants me to try and stick to 100 carbs a day but only 20 grams of sugar. How do I do this? I am upping my calories to 1,500 calories a day. I am also upping my weight lifting. I think its ok if I have more sugars on the day that I do weight lift.