Let's assume 15-17 for the range, but all the principles here apply to any range.
Almost everyone now agrees that 1NT should be opened with all 5-3-3-2 hands if in range. I recommend opening 1NT with
 QJ876
 QJ876  KJ2
 KJ2  KQ2
 KQ2  A8
 A8
or
 KQ
 KQ  K8765
 K8765  AJ6
 AJ6  K102.
 K102.
Would I ever eschew a 1NT opening with 15-17 balanced and a 5-3-3-2 hand with a 5-card major? Rarely. Maybe with a small doubleton, something extreme like:
 32
 32  AKQJ10
 AKQJ10  AJ10
 AJ10  432,
 432,
but still there will be a rebid problem*.
Speaking of rebid problems, when would you open 1NT with an unbalanced hand? Something other than the expected 5-3-3-2, 4-4-3-2 or 4-3-3-3? Here are some possibilities:
6-3-2-2: A 1NT opening with a 6-card minor (not a 6-card major--never!!) is possible. I'm fine with 1NT holding:
 K2
 K2  Q10
 Q10  AJ9652
 AJ9652  KQ10.
 KQ10.
Otherwise, there is a rebid problem after 1 -1M (not quite worth 3
-1M (not quite worth 3 , but too strong for 2
, but too strong for 2 ).
).
4-4-4-1 to 5-4-3-1: ACBL now allows a 1NT opening with a singleton as long as it is the queen or higher (and the hand is one of the above shapes). Don't go out of your way to do this. It is normal to open 1 of a minor with:
 KQ87
 KQ87  K
 K  AKJ65
 AKJ65  832 or
 832 or
 K1065
 K1065  K32
 K32  Q
 Q  AKJ76.
 AKJ76.
The only time you might open 1NT with a singleton is to avoid an awkward rebid problem. If you have a hand like:
 K
 K  Q765
 Q765  AQJ
 AQJ  A10876,
 A10876,
you'd be stuck (not quite enough to reverse, but no other good rebid) if partner responded 1 to your 1
 to your 1 . So, it is (rarely) okay to open 1NT with that high singleton honor (if the purpose is to avoid an awkward rebid problem). Again, don't open 1NT with something like
. So, it is (rarely) okay to open 1NT with that high singleton honor (if the purpose is to avoid an awkward rebid problem). Again, don't open 1NT with something like
 AQ54
 AQ54  A
 A  K1087
 K1087  K765
 K765
-- there is no rebid problem.
5-4-2-2: Similar advice to above. Don't go out of your way to open 1NT. Open a normal 1 with
 with
 KJ765
 KJ765  J4
 J4  A2
 A2  AQ87.
 AQ87.
Open a normal 1 with
 with
 K2
 K2  42
 42  AQ765
 AQ765  AQ42
 AQ42
-- there is no rebid problem. If you do open 1NT with 2 doubletons, it is better if the doubletons have honors. 1NT is okay with:
 KJ
 KJ  KQ108
 KQ108  AQ
 AQ  108765,
 108765,
but less desirable with:
 32
 32  AQJ8
 AQJ8  52
 52  AKJ106.
 AKJ106.
*Definition of "rebid problem" : A problem that arises when all of opener's rebids would be a lie. There is a family of hands that is more than a minimum, but not strong enough to  reverse  (or jump). There is no way to conveniently show the second suit. The hand contains the wrong shape or range for a notrump rebid (not 12-14). So, each of these hands would be hard to rebid if you opened 1 and partner responded with the dreaded 1
 and partner responded with the dreaded 1 :
:
 A
 A  A654
 A654  A32
 A32  K10765
 K10765
or
 Q
 Q  10876
 10876  AKQ
 AKQ  A10876.
 A10876.