I see no problem with this. Departments are well aware that people often need to make multiple applications in case they are not accepted into their preferred program. To ensure you don't waste the department's time you should be explicit in your application for the masters program that this is a "fallback" position if your application for a PhD candidature is unsuccessful. That way, if they decide to accept you into the PhD program, they will not spend much time over your other application.
I would love to be able to reassure you 100% that adding a masters application will not harm your chances of acceptance to a PhD program. Ideally it shouldn't, but I will add this slight caveat. There is a fairly well-known principle in behavioural economics that says that the "choice architecture" of a decision can affect the result. In particular, when people are presented with a set of ordinal options, there is sometimes a slight cognitive bias in favour of the middle one --- this is sometimes called "the Goldilocks effect". By giving a set of two options, there is no clear middle option, but the cognitive effect may be to make you look less appealing for admission to the PhD program. I'd love to think that the admissions committee would be immune to this heuristic bias, but you never know.