Can dieting cause spotting?

Can. Excessive weight loss may cause hormonal disturbances and spotting. It would be a good idea to consult your doctor if the problem is persistent.
Yes. Diet, exercise, stress can all effect your cycles. If it continues or if you are menopausal, see your doctor soon.