For the enum values, simply cast to integer before converting to a string:
writer.WriteElementString("MediaStretch",
((int)configuration.MediaStretch).ToString());
For the booleans this is not possible, so if you want 0/1 values you can use the conditional operator:
writer.WriteElementString("MuteMedia",configuration.MuteMedia ? "1" : "0");