Yes you can get infections from being fingered if your boyfriend has bacteria or other infections on his finger when he fingers you.
To avoid infection when getting fingered by your boyfriend ask your boyfriend to wash his hands in warm soapy water using antibacterial soap and be sure that your boyfriend has no cuts or other infections on his hand before he fingers you.