I want to be admitted to a European program that would mean so much to my future carreer. Particularly important documents to be sent with the application are reccomendation letters from professors. I already asked my Bachelor advisor and he told me he will write the letter for me, and that's great. But in the call for this program it is specified that up to 3 letters may be sent, and of course I want to exploit this possibility. I'd like to ask the letter to one of my professors of this semester (I'm attending the Master degree). He taught me two subjects; I've already taken a midterm of one of the subjects and got the maximum grade. I always attend lectures and I guess the professor noticed my interest in his subjects since I often ask questions or reply to the questions he poses to us during the lectures. Is it inappropriate to ask him a reccomendation letter if he's only known me this semester and we don't have a particular relationship (e.g. student-advisor)? He is very well known internationally and I think this letter could boost up my application to the program I want to participate to.
If you have had enough interactions that he can judge your potential, then he will probably be willing to write a letter - time permitting. But you can also ask him if he has enough confidence in you to write a letter. I strongly recommend that if you ask, you do so in person, rather than by email. He will probably need to know a bit more about you to be comfortable after only knowing you for a short time.
But nothing you say indicates he would be a poor choice.
I have written recommendation letters for students who had previously only interacted with me through following my courses. A politely written or spoken request is not inappropriate at all, in these circumstances.
Any extra information that you could provide to the professor would be helpful: transcripts, more background on the program and why you apply for this program specifically, etcetera. I personally prefer to receive such information and such request by email rather than by office invasion, but as Buffy's answer shows, this varies wildly between professors. But these are all details that do not change my main answer: it is not inappropriate at all.