Some speakers consider was für lower register and may use a form of welcher instead. This would be perceived as normal, albeit slightly more formal, in examples like Welche Getränke habt ihr mitgebracht? (instead of Was für Getränke habt ihr mitgebracht?), but could be perceived as rather stilted or even humorous in others, like Welch ein Verrat! (instead of Was für ein Verrat!).
The bare form was für is used before uncountable nouns and plural nouns. Countable singular nouns take the indefinite article: was für ein(e).
Was für is followed by the syntactically expected case. The component für, though etymologically the same as the preposition, does not have any case governance effects. So in the example above, the prepositional phrase would be für einen Schandfleck with einen Schandfleck in the accusative. But with was, the für is just a particle with no influence on case and the phrase ein Schandfleck remains in the nominative case.
The was and für do not have to be contiguous, for example: Was liest du für Bücher?