Hello there,
There is nothing unprofessional about contacting a person who have put up their profile on a public domain such as LinkedIn. Reaching out through people from Linkedin is a completely acceptable way to expand your network and engage in professional matters as the platform is tailored to provide such functions.
What will determine whether the outreach is professional or not is the tone and delivery of your message. General best practices such as utilizing polite dictions and be respectful of their time / not being pushy works perfectly.
Another note, actively reaching out would actually showcase your strong interest towards the firm and let them know you are someone who will proactively pursue things, a desirable traits of a prospective candidate.
Hope it helps.
Kind regards,
Nathan