No you cant use Map methods directly in Dynamic query.You need to first create a list/set to collect all the values or keys from the map and then you can use this list/set in your dynamic query.
You can not use a map in a dynamic query because you can only use variables and collections in the dynamic query. map.Keyset() and map.Values() are the methods that you can not use directly inside a dynamic query.